home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
MacHack 2000
/
MacHack 2000.toast
/
pc
/
The Hacks
/
Softshoe
/
Lisa's Mac Parts
/
Macintosh Memory
/
MasterPointerTo.h
< prev
next >
Wrap
Text File
|
2000-06-23
|
670b
|
31 lines
// MasterPointerTo.h
#ifndef MasterPointerTo_h
#define MasterPointerTo_h
#ifndef MasterPointer_h
#include "MasterPointer.h"
#endif
template < class Target >
class MasterPointerTo: public MasterPointer
{
public:
static MasterPointerTo<Target>& Make()
{ return *new( sizeof(Target) ) MasterPointerTo<Target>; }
Target& operator*() const
{ return *static_cast<Target*>( Pointer() ); }
Target *operator->() const
{ return static_cast<Target*>( Pointer() ); }
operator Target*() const
{ return static_cast<Target*>( Pointer() ); }
Target** Handle() const
{ return reinterpret_cast<Target**>( MasterPointer::Handle() ); }
};
#endif